package com.ipc.app.util.common;

import java.lang.reflect.InvocationTargetException;

import org.apache.commons.beanutils.BeanUtils;
import org.apache.log4j.Logger;

/**
 * @author haijie.zhang
 * 
 */
public class IPCCommonUtil {

	private static final Logger logger = Logger.getLogger(IPCCommonUtil.class);

	public static void beanConverter(Object des, Object orig) {
		try {
			BeanUtils.copyProperties(des, orig);
		} catch (IllegalAccessException e) {
			logger.error("【类型转换错误】IllegalAccessException, 传入参数参数："
					+ orig.toString(), e);
		} catch (InvocationTargetException e) {
			logger.error("【类型转换错误】InvocationTargetException, 目标类型参数:"
					+ des.getClass().getName(), e);
		}

	}
}
